/* indent size: 1 */

module.exports = app => {
	const DataTypes = app.Sequelize;

	const Model = app.model.define('market_goods', {
		goods_id: {
            type:  DataTypes.INTEGER,
            allowNull: false,
			primaryKey: true,
            comment: '商品ID'
		},
        market_id: {
            type:  DataTypes.INTEGER,
            allowNull: false,
			primaryKey: true,
            comment: '营销分类ID'
        },
        shop_id: {
            type: DataTypes.INTEGER(11),
            allowNull: true,
            defaultValue: null,
            comment: '商家ID，预留SASS功能'
        },
        is_delete: {
            type: DataTypes.INTEGER(1).UNSIGNED,
            allowNull: false,
            defaultValue: '0',
            comment: '是否删除，0->存在，1->删除'
        },
	}, {
		tableName: 'market_goods',
		timestamps: false
	});

	Model.sync({ alter: true });
	
	Model.associate = function() {
	}

	return Model;
};
